#!/bin/bash
set -euo pipefail
BaseDir=$(cd "$(dirname "$0")"; pwd)
cd ${BaseDir}

case "${1-''}" in
os)
    echo "test os"
    docker run -it --rm hub.oepkgs.net/openeuler/openeuler:24.03-lts bash -c "cat /etc/os-release"
;;
minio)
    echo "运行minio..."
    docker compose up minio
;;

#
clean)
    #这个命令是compose编排中的所有服务，单个容器的独立命令执行
    echo "停止并清理服务..."
    docker compose down --volumes --remove-orphans
;;

*)
    echo "Usage: os | minio"
;;
esac

